package com.evzgaga.evzrecon.pluginmanager;

import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;

/**
 *
 * @author Bastien
 */
public class JarClassLoader extends URLClassLoader {

    public JarClassLoader() {
        super(new URL[] {});
    }

    public JarClassLoader(URL[] urls) {
        super(urls);
    }
    
    public void loadJar(String jarPath) throws MalformedURLException {
        String jarUrl = "jar:file://" + jarPath + "!/";
        
        addURL(new URL(jarUrl));
    }
}
